const editView = (localData) => {
    let markup = `
<form action="" class="form-horizontal modal-form" id="form" role="form">
    <div class="form-group">
        <label for="pid" class="col-sm-2 control-label">上级分类:</label>
        <div class="col-sm-9">
          <select name="pid" id="pid" class="form-control">
          </select>
        </div>
    </div>
    <div class="form-group">
        <label for="name_zh" class="col-sm-2 control-label">中文分类名:</label>
        <div class="col-sm-9">
            <input type="text" id="cat_name_zh" name="name_zh"  value="{{:name_zh}}" class="form-control">
             <input type="hidden" id="id" name="id"  value="{{:id}}">
        </div>
    </div>
     <div class="form-group">
        <label for="name_en" class="col-sm-2 control-label">英文分类名:</label>
        <div class="col-sm-9">
            <input type="text" id="name_en" name="name_en"  value="{{:name_en}}" class="form-control">
        </div>
    </div>
     <div class="form-group">
        <label for="desc_zh " class="col-sm-2 control-label">中文描述:</label>
        <div class="col-sm-9">
            <textarea class="form-control" rows="4" name="desc_zh" id="desc_zh">{{:desc_zh}}</textarea>
        </div>
    </div>
     <div class="form-group">
        <label for="desc_en " class="col-sm-2 control-label">英文描述:</label>
        <div class="col-sm-9">
            <textarea class="form-control" rows="4" name="desc_en" id="desc_en">{{:desc_en}}</textarea>
        </div>
    </div>
    <div class="form-group">
        <label for="sort" class="col-sm-2 control-label">排序:</label>
        <div class="col-sm-9">
            <input type="text" id="sort" name="sort" class="form-control" placeholder="数值越大越靠前" value="{{:sort}}">
        </div>
    </div>
    <div class="form-group">
        <div class="btn-box">
          <input type="button" class="btn btn-primary" id="submitBtn"  value="提交">
        </div>
    </div>
</form>
    `;

    let template = $.templates(markup);
    let compiledHtml = template.render(localData);

    return compiledHtml;

};

export {
    editView
}